#ifndef PARTICLE_H
#define PARTICLE_H

#include <QDebug>
#include <QVector3D>

class Particle
{

	int       m_idx;
	QVector3D m_p;
	QVector3D m_v;
    qreal     m_m;
	QVector3D m_a;
	QVector3D m_color;

    qreal     m_pressure;
    qreal     m_density;

public:
    Particle(int i, const QVector3D& p, qreal m = 0.001, const QVector3D& v = QVector3D(0.0,0.0,0.0));
	Particle();
	Particle(const Particle &particle);

    qreal&     mass        (void);
	QVector3D& velocity    (void);
	QVector3D& position    (void);
	QVector3D& acceleration(void);
    qreal&     pressure    (void);
    qreal&     density     (void);
	QVector3D& color       (void);

	int        idx         (void) const;
    qreal      mass        (void) const;
	QVector3D  velocity    (void) const;
	QVector3D  position    (void) const;
	QVector3D  acceleration(void) const;
    qreal      pressure    (void) const;
    qreal      density     (void) const;
	QVector3D  color       (void) const;

	const Particle& operator=(const Particle& particle);

	void addAcceleration  (const QVector3D& a);
	void resetAcceleration();

};

QDebug operator<< (QDebug d, const Particle &model);

#endif // PARTICLE_H
